<?php
class UaCheckerComponent extends Object
{

    function _getAgent(){
	return getenv( "HTTP_USER_AGENT" );
    }

    function _checkUa($ua_name = null){
	$ag = $this->_getAgent();
	if( ereg( $ua_name, $ag ) ){ 
	    return True;
	}else{
	    return False;
	}
    }

    function getUserAgent(){
	return $this->_getAgent();
    }

    function is_IE(){
	return $this->_checkUa('MSIE');
    }

    function is_FireFox(){
	return $this->_checkUa('FireFox');
    }

    function is_Chrome(){
	return $this->_checkUa('Chrome');
    }

    function is_Opera(){
	return $this->_checkUa('Opera');
    }

    function is_Safari(){
	return $this->_checkUa('Safari');
    }

}
?>